<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-/W3C/DTD XHTML 1.0 Strict/EN" "http:/www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http:/www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http:/selenium-ide.openqa.org/profiles/test-case">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>create-and-delete-users</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
    <thead>
    <tr>
        <td rowspan="1" colspan="3">create-and-delete-users</td>
    </tr>
    </thead>
    <tbody>
    <tr>
	<td>open</td>
	<td>/sessions/new</td>
	<td></td>
</tr>
<tr>
	<td>type</td>
	<td>id=login</td>
	<td>admin</td>
</tr>
<tr>
	<td>type</td>
	<td>id=password</td>
	<td>admin</td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>commit</td>
	<td></td>
</tr>
<tr>
	<td>waitForElementPresent</td>
	<td>css=.js-user-authenticated</td>
	<td></td>
</tr>
<tr>
	<td>open</td>
	<td>/users</td>
	<td></td>
</tr>
<tr>
	<td>store</td>
	<td>javascript{new Date().getTime()}</td>
	<td>userId</td>
</tr>
<tr>
	<td>waitForText</td>
	<td>content</td>
	<td>*Create User*</td>
</tr>
<tr>
	<td>click</td>
	<td>id=users-create</td>
	<td></td>
</tr>
<tr>
	<td>waitForText</td>
	<td>id=create-user-form</td>
	<td>*Create User*</td>
</tr>
<tr>
	<td>type</td>
	<td>id=create-user-login</td>
	<td>${userId}</td>
</tr>
<tr>
	<td>type</td>
	<td>id=create-user-name</td>
	<td>Name of ${userId}</td>
</tr>
<tr>
	<td>type</td>
	<td>id=create-user-password</td>
	<td>password</td>
</tr>
<tr>
	<td>click</td>
	<td>id=create-user-submit</td>
	<td></td>
</tr>
<tr>
	<td>waitForText</td>
	<td>id=users-list</td>
	<td>*${userId}*</td>
</tr>
<tr>
	<td>click</td>
	<td>css=[data-login=&quot;${userId}&quot;] .js-user-deactivate</td>
	<td></td>
</tr>
<tr>
	<td>waitForText</td>
	<td>id=deactivate-user-form</td>
	<td>*${userId}*</td>
</tr>
<tr>
	<td>click</td>
	<td>id=deactivate-user-submit</td>
	<td></td>
</tr>
<tr>
	<td>waitForNotText</td>
	<td>id=users-list</td>
	<td>*${userId}*</td>
</tr>
<tr>
	<td>open</td>
	<td>/sessions/logout</td>
	<td></td>
</tr>
<tr>
	<td>open</td>
	<td>/sessions/new</td>
	<td></td>
</tr>
<tr>
	<td>type</td>
	<td>id=login</td>
	<td>tester</td>
</tr>
<tr>
	<td>type</td>
	<td>id=password</td>
	<td>password</td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>commit</td>
	<td>deactivate-user-form</td>
</tr>
<tr>
	<td>waitForText</td>
	<td>login_form</td>
	<td>*Authentication failed*</td>
</tr>
</tbody>
</table>
</body>
</html>
